<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
                "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
  <title>Description of fixinfds</title>
  <meta name="keywords" content="fixinfds">
  <meta name="description" content="FIXINFDS  Fix a user generated ("hand rolled") inference data structure to make sure it meets">
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <meta name="generator" content="m2html &copy; 2003 Guillaume Flandin">
  <meta name="robots" content="index, follow">
  <link type="text/css" rel="stylesheet" href="../../m2html.css">
</head>
<body>
<a name="_top"></a>
<div><a href="../../menu.html">Home</a> &gt;  <a href="#">ReBEL-0.2.7</a> &gt; <a href="#">core</a> &gt; fixinfds.m</div>

<!--<table width="100%"><tr><td align="left"><a href="../../menu.html"><img alt="<" border="0" src="../../left.png">&nbsp;Master index</a></td>
<td align="right"><a href="menu.html">Index for .\ReBEL-0.2.7\core&nbsp;<img alt=">" border="0" src="../../right.png"></a></td></tr></table>-->

<h1>fixinfds
</h1>

<h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="box"><strong>FIXINFDS  Fix a user generated ("hand rolled") inference data structure to make sure it meets</strong></div>

<h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="box"><strong>function InferenceDS = fixinfds(InferenceDS) </strong></div>

<h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="fragment"><pre class="comment"> FIXINFDS  Fix a user generated (&quot;hand rolled&quot;) inference data structure to make sure it meets
           the consistency requirements of all ReBEL inference algorithms. This function will not
           clobber any predefined fields, it will however check for consistency and add other
           required fields to InferenceDS that the user has not defined, or for which the default
           settings are required.

   InferenceDS = fixinfds(InferenceDS)

   INPUT
          InferenceDS        ReBEL inference data structure that has been &quot;hand-rolled&quot;, i.e
                             directly defined by the user and not generated by using GENINFDS.
                             This data structure might not be completely consistent.

   OUTPUT
          InferenceDS

   SEE ALSO
     <a href="geninfds.html" class="code" title="function InferenceDS = geninfds(ArgDS)">GENINFDS</a>, examples/gssm/INFDS_TRAIN_NN, examples/parameter_estimation/DEMPE2

   Copyright (c) Oregon Health &amp; Science University (2006)

   This file is part of the ReBEL Toolkit. The ReBEL Toolkit is available free for
   academic use only (see included license file) and can be obtained from
   http://choosh.csee.ogi.edu/rebel/.  Businesses wishing to obtain a copy of the
   software should contact rebel@csee.ogi.edu for commercial licensing information.

   See LICENSE (which should be part of the main toolkit distribution) for more
   detail.</pre></div>

<!-- crossreference -->
<h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
This function calls:
<ul style="list-style-image:url(../../matlabicon.gif)">
<li><a href="consistent.html" class="code" title="function errstring = consistent(ds, type)">consistent</a>	CONSISTENT   Check ReBEL data structures for consistentency.</li></ul>
This function is called by:
<ul style="list-style-image:url(../../matlabicon.gif)">
<li><a href="../.././ReBEL-0.2.7/examples/parameter_estimation/dempe2.html" class="code" title="">dempe2</a>	DEMPE2  Demonstrate how the ReBEL toolkit is used to train a neural network</li></ul>
<!-- crossreference -->


<h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="fragment"><pre>0001 <a name="_sub0" href="#_subfunctions" class="code">function InferenceDS = fixinfds(InferenceDS)</a>
0002 
0003 <span class="comment">% FIXINFDS  Fix a user generated (&quot;hand rolled&quot;) inference data structure to make sure it meets</span>
0004 <span class="comment">%           the consistency requirements of all ReBEL inference algorithms. This function will not</span>
0005 <span class="comment">%           clobber any predefined fields, it will however check for consistency and add other</span>
0006 <span class="comment">%           required fields to InferenceDS that the user has not defined, or for which the default</span>
0007 <span class="comment">%           settings are required.</span>
0008 <span class="comment">%</span>
0009 <span class="comment">%   InferenceDS = fixinfds(InferenceDS)</span>
0010 <span class="comment">%</span>
0011 <span class="comment">%   INPUT</span>
0012 <span class="comment">%          InferenceDS        ReBEL inference data structure that has been &quot;hand-rolled&quot;, i.e</span>
0013 <span class="comment">%                             directly defined by the user and not generated by using GENINFDS.</span>
0014 <span class="comment">%                             This data structure might not be completely consistent.</span>
0015 <span class="comment">%</span>
0016 <span class="comment">%   OUTPUT</span>
0017 <span class="comment">%          InferenceDS</span>
0018 <span class="comment">%</span>
0019 <span class="comment">%   SEE ALSO</span>
0020 <span class="comment">%     GENINFDS, examples/gssm/INFDS_TRAIN_NN, examples/parameter_estimation/DEMPE2</span>
0021 <span class="comment">%</span>
0022 <span class="comment">%   Copyright (c) Oregon Health &amp; Science University (2006)</span>
0023 <span class="comment">%</span>
0024 <span class="comment">%   This file is part of the ReBEL Toolkit. The ReBEL Toolkit is available free for</span>
0025 <span class="comment">%   academic use only (see included license file) and can be obtained from</span>
0026 <span class="comment">%   http://choosh.csee.ogi.edu/rebel/.  Businesses wishing to obtain a copy of the</span>
0027 <span class="comment">%   software should contact rebel@csee.ogi.edu for commercial licensing information.</span>
0028 <span class="comment">%</span>
0029 <span class="comment">%   See LICENSE (which should be part of the main toolkit distribution) for more</span>
0030 <span class="comment">%   detail.</span>
0031 
0032 <span class="comment">%===================================================================================================</span>
0033 
0034 <span class="comment">%--- Add some needed fields with default values that the user either forgot to add, or intentionally</span>
0035 <span class="comment">%--- left blank in order to set default values:</span>
0036 
0037 <span class="keyword">if</span> ~isfield(InferenceDS,<span class="string">'type'</span>)
0038   InferenceDS.type = <span class="string">'InferenceDS'</span>;
0039 <span class="keyword">end</span>
0040 
0041 <span class="keyword">if</span> ~isfield(InferenceDS,<span class="string">'stateAngleCompIdxVec'</span>)
0042   InferenceDS.stateAngleCompIdxVec = [];
0043 <span class="keyword">end</span>
0044 
0045 <span class="keyword">if</span> ~isfield(InferenceDS,<span class="string">'obsAngleCompIdxVec'</span>)
0046   InferenceDS.obsAngleCompIdxVec = [];
0047 <span class="keyword">end</span>
0048 
0049 <a href="consistent.html" class="code" title="function errstring = consistent(ds, type)">consistent</a>(InferenceDS,<span class="string">'InferenceDS'</span>);
0050</pre></div>
<hr><address>Generated on Tue 26-Sep-2006 10:36:21 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/">m2html</a></strong> &copy; 2003</address>
</body>
</html>